home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -serious- / programming / c / stormamiga_lib-v45_00d / include / stdlib.h < prev    next >
C/C++ Source or Header  |  2000-02-28  |  2KB  |  98 lines

  1. #ifndef _INCLUDE_STDLIB_H
  2. #define _INCLUDE_STDLIB_H
  3.  
  4. /*
  5. **  $VER: stdlib.h 1.02 (7.2.97)
  6. **  StormC Release 3.0
  7. **
  8. **  '(C) Copyright 1995/96/97 Haage & Partner Computer GmbH'
  9. **       All Rights Reserved
  10. */
  11.  
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15.  
  16. typedef unsigned size_t;
  17. typedef int wchar_t;
  18.  
  19. #ifndef NULL
  20. #define NULL 0
  21. #endif
  22.  
  23. #ifndef ERANGE
  24. #define ERANGE 1000
  25. #endif
  26.  
  27. #ifndef HUGE_VAL
  28. #define HUGE_VAL 1.797693134862316E+308
  29. #endif
  30.  
  31. typedef struct {
  32.     int quot;
  33.     int rem;
  34. } div_t;
  35.  
  36. typedef struct {
  37.     long quot;
  38.     long rem;
  39. } ldiv_t;
  40.  
  41. double atof(const char *);
  42. int atoi(const char *);
  43. long atol(const char *);
  44. long long atoll(const char *);
  45. double strtod(const char *, char **);
  46. long strtol(const char *, char **, int);
  47. unsigned long strtoul(const char *, char **, int);
  48. long long strtoll(const char *, char **, int);
  49. unsigned long long strtoull(const char *, char **, int);
  50.  
  51. #ifndef _INLINE_INCLUDES
  52. int abs(int);
  53. long int labs(long int);
  54. long long int llabs(long long int);
  55. #endif
  56.  
  57. div_t div(int, int);
  58. ldiv_t ldiv(long, long);
  59.  
  60. #define RAND_MAX 0x7fff
  61. int rand( void );
  62. void srand(unsigned);
  63.  
  64. void *calloc(size_t , size_t);
  65. void free(void *);
  66. void *malloc(size_t);
  67. void *realloc(void *, size_t);
  68.  
  69. void abort(void);
  70. int atexit(void (*)(void));
  71. void exit(int);
  72.  
  73. char *getenv(const char *);
  74. int system(const char *);
  75.  
  76. void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *));
  77. void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
  78.  
  79. #ifdef __cplusplus
  80. }
  81. #endif
  82.  
  83. #ifdef _INLINE_INCLUDES
  84. __inline int abs(int i) { return i < 0 ? -i : i; };
  85. __inline long int labs(long int i) { return i < 0 ? -i : i; };
  86. __inline long long int llabs(long long int i) { return i < 0 ? -i : i; };
  87. #endif
  88.  
  89. /*----- support for stormamiga.lib -----*/
  90.  
  91. #ifdef STORMAMIGA
  92.   #ifndef  STDLIB_STORMAMIGA_H
  93.     #include <stdlib_stormamiga.h>
  94.   #endif
  95. #endif
  96.  
  97. #endif
  98.